package com.zijie.goods.model;

import com.baomidou.mybatisplus.annotation.*;
import com.zijie.brand.model.Brand;
import com.zijie.category.model.Category;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

@TableName("good")
@Getter
@Setter
public class Goods {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField(condition = SqlCondition.LIKE,whereStrategy = FieldStrategy.NOT_EMPTY)
    private String name;
    private String alias;//别名
    private String summary;//商品摘要
    private Integer categoryId;//分类id
    private Integer brandId;
    private String detail;//商品详情
    private BigDecimal price;//售价
    private BigDecimal markPrice;//原售价
    @TableField("is_hot")
    private Boolean isHot;//是否热门
    private Boolean isDel;//是否删除
    private String description;//商品描述
    private Boolean isTakeDown;// 是否下架
    private Integer qty;//库存
    private String pic;//主图
    private String pic2;//详情图
    private Integer sold;//销量

    @TableField(exist = false)
    private Category category;
    @TableField(exist = false)
    private Brand brand;
}
